//
//  ViewController.m
//  YJScanImageDemo
//
//  Created by 申元江 on 16/10/27.
//  Copyright © 2016年 YuanJiang. All rights reserved.
//

#import "ViewController.h"
#import "YuanJiangScanImage.h"
@interface ViewController ()

@property(nonatomic,strong) UIImageView *image1;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addImage];
    
}

-(void)addImage
{
    _image1= [[UIImageView alloc] initWithFrame:CGRectMake(100, 275, 150, 89)];
    _image1.image= [UIImage imageNamed:@"iconMM.jpg"];
    [self.view addSubview:_image1];
    
    UITapGestureRecognizer *tapGester = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(click_changeBig:)];
    //图片的用户交互打开
    _image1.userInteractionEnabled=YES;
    [_image1 addGestureRecognizer:tapGester];
    
}

-(void)click_changeBig:(UITapGestureRecognizer *)tap
{
    NSLog(@"点击图片");
    UIImageView *clickBigImageView = (UIImageView *)tap.view;
  [YuanJiangScanImage scanBigImageWithImageView:clickBigImageView];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
